<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('attraction_spot_position', function (Blueprint $table) {
            $table->comment('景点位置');
            $table->bigIncrements('id');
            $table->string('name', 64)->nullable(false)->comment('位置名称');
            $table->decimal('longitude', 12, 6)->nullable(false)->comment('中心经度');
            $table->decimal('latitude', 12, 6)->nullable(false)->comment('中心纬度');
            $table->decimal('altitude', 8, 2)->nullable(true)->comment('中心海拔');
            $table->datetimes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('attraction_spot_position');
    }
};
